package com.cloud.flowable.controller;

import com.cloud.common.domain.Result;
import com.cloud.controller.BaseController;
import com.cloud.enums.BusinessType;
import com.cloud.flowable.entity.WfDeployForm;
import com.cloud.flowable.service.IWfDeployFormService;
import com.cloud.logs.Logs;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "流程表单关联表")
@RestController
@RequestMapping("/flowable/DeployForm")
public class WfDeployFormController extends BaseController {

    @Autowired
    private IWfDeployFormService deployFormService;

    @Operation(summary = "挂载流程表单")
    @Logs(title = "挂载流程表单", businessType = BusinessType.INSERT)
    @PostMapping("/addDeployForm")
    public Result addDeployForm(@RequestBody WfDeployForm deployForm) {
        return toResult(deployFormService.insertWfDeployForm(deployForm));
    }

}
